/*
 * Qinlan Shen
 * November 8, 2010
 * Pd. 8
 * 
 * Class for PointItems that are generated around Mr. Rose after a script ends.  These PointItems
 * fall straight down.
 * 
 */

import java.awt.*;

public class PointItem extends Movable
{
	private int normValue;
	
	public PointItem(Image i, int h, double roseX, double roseY, int r, double sR, int v)
	{
		img = i;
		hitbox = h;
		normValue = v;
		do
		{
			x = roseX + (int)((Math.random()-.5) * 2 * r);
			y = roseY + (int)((Math.random()-.5) * 2 * r);
		}
		while (x < h || y < h || x > 640 - h || y > 820 - h);
		xSpeed = 0;
		ySpeed = 0;
		ySpeed = (int)((Math.random()) * sR) + 2;
	}
	
	public int getValue()
	{
		return normValue - (int)y * 2;
	}
}